﻿CREATE TABLE [steve].[ContentRevision] (
    [ContentId]            UNIQUEIDENTIFIER NOT NULL,
    [RevisionNumber]       INT              NOT NULL,
	[Title]                NVARCHAR (200)   NULL,
    [Teaser]           NVARCHAR (4000)  NULL,
    [ThumbnailContentId]   UNIQUEIDENTIFIER NULL,
    [PublicationDate]      DATETIME2(7)         NULL,
    [PublisherUrlId]       UNIQUEIDENTIFIER NULL,
    [Publisher]            NVARCHAR (200)   NULL,
	[Author] nvarchar(200) null,
    [ApprovalDate]         DATETIME2(7)         NULL,
	[ApprovalMembershipId] uniqueidentifier null,
    [Height]               INT              NULL,
    [Width]                INT              NULL,
    [MimeType]             VARCHAR (50)     NULL,
    [MimeSubtype]          VARCHAR (50)     NULL,
    [ContentDataId]        UNIQUEIDENTIFIER NULL,
	[RevisionComment]      nVARCHAR (400)    NOT NULL,
    [RevisionDate]         DATETIME2(7)         NOT NULL,
    [RevisionMembershipId] UNIQUEIDENTIFIER NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Holds metadata for every edit done to the content table (but not the content body).', @level0type = N'SCHEMA', @level0name = N'steve', @level1type = N'TABLE', @level1name = N'ContentRevision';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Link to Content table', @level0type = N'SCHEMA', @level0name = N'steve', @level1type = N'TABLE', @level1name = N'ContentRevision', @level2type = N'COLUMN', @level2name = N'ContentId';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Primary key (compound with ContentId)', @level0type = N'SCHEMA', @level0name = N'steve', @level1type = N'TABLE', @level1name = N'ContentRevision', @level2type = N'COLUMN', @level2name = N'RevisionNumber';

